package com.zhigongtech.core.web.jwt;

import org.apache.commons.lang3.StringUtils;

import com.zhigongtech.common.consts.JWTConst;
import com.zhigongtech.common.web.util.HttpKit;

public class UserUtils {

	public static String getCurrentUserLoginName() {
		String token = HttpKit.getRequest().getHeader(JWTConst.AUTH_HEADER_STRING);
		if(StringUtils.isNotBlank(token)) {
			String account = JwtUtil.getAccount(token);
			return account;
		}
		return null;
	}
}
